package com.hkemmm.cola;

public class Main {

    public static void main(String[] args) {
        ColaEmployee[] emp = new ColaEmployee[10];      //员工数组
        //员工1，固定工资
        SalariedEmployee emp1 = new SalariedEmployee("张三",6,20000);

        //员工2，小时工
        HourlyEmployee emp2 = new HourlyEmployee("李四",8,120);
        emp2.setHour(180);      //设置工作时常

        //员工3，销售员工
        SalesEmployee emp3 = new SalesEmployee("王五",1,0.5);
        emp3.setSales_mouth(20000);     //当月销售额

        //员工4，固定工资
        SalariedEmployee emp4 = new SalariedEmployee("老六",7,15000);

        //员工5，小时工
        HourlyEmployee emp5 = new HourlyEmployee("老七",10,100);
        emp5.setHour(180);       //设置工作时常

        emp[0] = emp1;
        emp[1] = emp2;
        emp[2] = emp3;
        emp[3] = emp4;
        emp[4] = emp5;


        Company company = new Company();
//        for(int i = 0;emp[i] != null;i++){
//            company.print_Employee_salary(6,emp[i]);
//        }


        for (ColaEmployee c: emp) {
            company.print_Employee_salary(5,c);
        }
    }

}
